package com.jianshuai.feign;

import com.jianshuai.domain.Device;
import com.jianshuai.fallback.DeviceFeignClientFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

@FeignClient(value = "device-server", fallbackFactory = DeviceFeignClientFallback.class)
public interface DeviceFeignClient {
    @GetMapping("/device/getByBuildId/{id}")
    List<Device> getByBuildId(@PathVariable("id") Long id);

    @GetMapping("/device/getDeviceListByDeviceType/{type}")
    public List<Device> getDeviceListByDeviceType(@PathVariable("type") Long type);

}
